package team.archai.nexus.flow.service.impl;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import team.archai.nexus.flow.service.IProcessEngines;

/**
 * @author li shi bin
 */
@Service
@ConditionalOnProperty(
        value = {"archai-nexus.flow-designer.enabled"},
        havingValue = "true"
)
public class ProcessEnginesImpl implements IProcessEngines {
    @Override
    public ProcessEngine getDefault() {
        return ProcessEngines.getDefaultProcessEngine();
    }
}
